//
//  PublicDefine.h
//  Training
//
//  Created by michael shen on 15/6/15.
//  Copyright (c) 2015年 coolem. All rights reserved.
//

#ifndef Training_PublicDefine_h
#define Training_PublicDefine_h



//#import <BaiduMapAPI_Base/BMKBaseComponent.h>//引入base相关所有的头文件

//#import <BaiduMapAPI_Map/BMKMapComponent.h>//引入地图功能所有的头文件

//#import <BaiduMapAPI_Search/BMKSearchComponent.h>//引入检索功能所有的头文件

//
//#import <BaiduMapAPI_Cloud/BMKCloudSearchComponent.h>//引入云检索功能所有的头文件
//
//#import <BaiduMapAPI_Location/BMKLocationComponent.h>//引入定位功能所有的头文件
//
//#import <BaiduMapAPI_Utils/BMKUtilsComponent.h>//引入计算工具所有的头文件
//
//#import <BaiduMapAPI_Radar/BMKRadarComponent.h>//引入周边雷达功能所有的头文件
//
//#import < BaiduMapAPI_Map/BMKMapView.h>//只引入所需的单个头文件



//#define DebugModel
#define ManagementModel

#define TestingObject  //OutLineAddress TestingObject InLineAddress OutLineAddress AmAddress
//
//
#if defined (TestingObject)
    #define ServerAddress WangAddress
#elif defined(InLineAddress)
    #define ServerAddress LocalAddress
#endif

#define WangAddress @"http://120.26.99.55:8888/api/"
#define LocalAddress @"http://localhost:8888/api/"
#define AliAddress @"http://www.sxndac.cn:80/"
#define AmerAddress @"http://47.88.85.69:10098/mgt/v1/"
#define LiAddress @"http://test.lijiang.travel/yktteam/"
#define FormalAddress @"http://www.lijiang.travel/yktteam/"

#define ScreenScale(num) SCREEN_WIDTH*num/375
#define IOS7_OR_LATER   ([[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending)

#define IOS8_OR_LATER   ([[[UIDevice currentDevice] systemVersion] compare:@"8.0"] != NSOrderedAscending)

#define ColorRGB(x,y,z,a) [UIColor colorWithRed:x/255.0 green:y/255.0 blue:z/255.0 alpha:a]
#define HexRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HexRGBAlpha(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:(a)]

#define DefaultColor ColorRGB(0, 141, 255, 1.0)

#define DefaultWordColor HexRGB(0x272727)

#define PID @"2088221486824878"

//#define BaiduMapKey @"9ZNlko34RmskiiV4Q3Q37Ci0EvoP0nQG"
#define UMKey @"57989e5967e58ec0aa002673"
#define WeChatAppID @"wxa3e3b8b534fa7e63"
#define WeChatSecret @"22435db3bdadb3a831612a2f6931e858"
#define kDevice_Is_iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define StatusBarHeight CGRectGetHeight([UIApplication sharedApplication].statusBarFrame)
#define TabBarHeight [Utils getTabBarHeight]
#define randomColor random(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))
#define random(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)/255.0]


typedef void (^CommentInfoBlock)(NSArray *array);


#define LocalizedLanguage(key)      NSLocalizedString(key, nil)
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define UnNullString(string) [Utils changeTheNullString:string]
#define UnNullNumber(number) [Utils changeTheNullNumber:number]
#define DefaultGreenColor HexRGB(0x4aca69)
#define DefaultMigrantBlue HexRGB(0x2599ce)
#define DefaultLineColor HexRGB(0xdddddd)
#define DefaultCellLineColor HexRGB(0xF1F1F2)
#define DefaultYellowColor HexRGB(0xF9AF48)
#define DefaultRedColor HexRGB(0xDD1F26)
#define DefaultBackGround [UIColor colorWithRed:0.96 green:0.96 blue:0.96 alpha:1.0f]
#define DefaultBlueColor HexRGB(0x35A5FC)

#define DefaultOpenColor HexRGB(0xFBB03B)
#define DefaultTenantColor HexRGB(0x018EFF)
#define DefaultRepairColor HexRGB(0xF33745)


#define JMESSAGE_APPKEY @"bdeca83bdcf41cab727dfe66"
#endif
